﻿using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EkStudio.com.common.unit
{

    /// <summary>
    /// 标签字符配置
    /// </summary>
    public class ULabel
    {
        static ULabel()
        {
            StringBuilder text = new StringBuilder();
            text.Append("action add all alter any as asc authorization backup begin ");
            text.Append("break browse bulk by cascade case check checkpoint close clustered ");
            text.Append("coalesce collate column commit committed compute confirm constraint ");
            text.Append("contains containstable continue controlrow convert create cross current ");
            text.Append("current_date current_time current_timestamp current_user cursor database ");
            text.Append("dbcc deallocate declare default delete deny desc disable disk distinct ");
            text.Append("distributed double drop dummy dump else enable end errlvl errorexit ");
            text.Append("escape except exec execute exists exit fetch file fillfactor floppy for ");
            text.Append("foreign forward_only freetext freetexttable from full function go goto ");
            text.Append("grant group having holdlock identity identity_insert identitycol if in ");
            text.Append("index inner insert intersect into is isolation join key kill left level ");
            text.Append("lineno load mirrorexit move national no nocheck nonclustered not ");
            text.Append("nounload null nullif of off offsets on once only open opendatasource ");
            text.Append("openquery openrowset option order outer output over percent perm ");
            text.Append("permanent pipe plan precision prepare primary print privileges proc ");
            text.Append("procedure processexit public raiserror read readtext read_only ");
            text.Append("reconfigure recovery references repeatable replication restore restrict ");
            text.Append("return returns revoke right rollback rowcount rowguidcol rule save ");
            text.Append("schema select serializable session_user set setuser shutdown some ");
            text.Append("statistics stats system_user table tape temp temporary textsize then to ");
            text.Append("update updatetext use user values varying view waitfor when where while ");
            text.Append("with work writetext");
            SQLKeys = text.ToString();
        }

        //-------------属性控件----------------------------------------
        public const string PROPERTY_TABLE_CAPTION_DES = "字段组的语言标签，为作为默认语言的直接字符";

        public const string PROPERTY_TABLE_KEY_DES = "字段组的关键字,界面显示为字段组的ID，用于Js调用";


        public const string PROPERTY_TABLE_ShowModel_DES = "功能未启用";

        public const string PROPERTY_TABLE_Expanded_DES = "启用扩展字段组后，组内字段可设置为扩展字段，字段的显示标签，由主表字段控制";

        public const string PROPERTY_TABLE_ExpandField_DES = "指定扩展字段的加载来源，必须是主表字段";

        public const string PROPERTY_TABLE_HasPopMenu_DES = "是否加载弹出菜单，作用于是否可以操作子表";

        public const string PROPERTY_TABLE_ShowQuery_DES = "当前子表字段组是否可作为查询对象";

        public const string PROPERTY_TABLE_SchemeDefaut_DES = "当前子表字段组是否作为默认查询对象";

        public const string PROPERTY_TABLE_GroupIndex_DES = "将相同值(大于0)的多个字段组放在同一个Tab分组下";

        public const string PROPERTY_TABLE_TreeTable_DES = "设置当前子表是否是表格树结构";

        public const string PROPERTY_TABLE_TreeField_DES = "设置当前表格树的路径保存字段,要求是dtString类型字段";

        public const string PROPERTY_TABLE_TreeCaption_DES = "设置当前表格树的级别字段，要求字段为dtInteger类型";



        public const string PROPERTY_FIELD_DropStyle_DES = "字段下拉框内容设置";


        //语法高亮关键字

        public static string SQLKeys = "";
        /// <summary>
        /// 弹出确认提示
        /// </summary>
        /// <param name="text"></param>
        /// <returns></returns>
        public static DialogResult Comfirm_Ok_Cancel(string text) {
            return XtraMessageBox.Show(text, "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
        }
    }
}
